<template>
  <el-container class="full_box">
    <el-header>
      <add-student-card class="form-button"></add-student-card>
    </el-header>
    <el-main class="card_show">
      <!--学生的姓名跟学号展示-->
      <student-card
          v-for="student in studentList"
          :key="student.studentId"
          :id="student.studentId"
          :name="student.name"
          :twsid="student.twsid"
      >
      </student-card>
    </el-main>
  </el-container>
</template>

<script>
import StudentCard from "@/components/teacher/mianView/studentList/StudentCard";
import AddStudentCard from "@/components/teacher/mianView/studentList/AddStudentCard";
import { mapState } from 'vuex'
export default {
  name: "StudentManger",
  components: {AddStudentCard, StudentCard},
  computed:mapState({
    studentList:state => state.teacher_studentData.studentList
  }),

}
</script>

<style scoped>
.card_show {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start
}
.form-button{
  margin: 20px;
}
</style>